package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.AutoApply;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;

import java.util.List;

/**
 * Created by yangsy on 2016/12/16.
 */
public interface AutoApplyService {
    /**
     * 删除
     *
     * @param autoApplyId
     * @return
     */
    int deleteByPrimaryKey(String autoApplyId);

    /**
     * 新增
     *
     * @param record
     * @return
     */
    int insert(AutoApply record);

    int saveSelective(AutoApply record, EmployeeVo employeeVo) throws Exception;

    /**
     * 根据主键id查询
     *
     * @param autoApplyId
     * @return
     */
    AutoApply selectByPrimaryKey(String autoApplyId);

    /**
     * 更新
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(AutoApply record);

    int updateByPrimaryKey(AutoApply record);

    /**
     * 个人申请列表
     *
     * @param autoApply
     * @return
     */
    JSONObject list(AutoApply autoApply);

    /**
     * 代办查找
     *
     * @param bootstrapSearchBean
     * @return
     */
    List<Object> searchByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 节点处理
     *
     * @param autoApply
     * @param employeeVo
     * @return
     */
    void dispose(AutoApply autoApply, EmployeeVo employeeVo) throws Exception;

    /**
     * 代办总条数
     *
     * @param bootstrapSearchBean
     * @return
     */
    int totalCountByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 查询我已经审批的
     *
     * @param autoApply
     * @return
     */
    JSONObject processed(AutoApply autoApply);

    /**
     * 查询我的用车待办
     */
    JSONObject listToDoTask(AutoApply autoApply);

    /**
     * 查询已完成的申请单
     */
    JSONObject queryFinishApply(AutoApply autoApply);
}
